export type IDataTypeResult = 'array' | 'object' | 'date' | 'number' | 'string' | 'null' | 'undefined';

const _getDataType = (data: any): IDataTypeResult => {
    const type = Object.prototype.toString.call(data);
    return type.replace('[object ', '').replace(']', '').toLowerCase() as IDataTypeResult;
}

export {
    _getDataType
}